<template>
  <div>
    <elm-page-tb>
      <template #top>
        <el-input placeholder="请查询输入内容" size="mini" prefix-icon='el-icon-search' style="width:250px;" v-model="postData.name" clearable></el-input>
        <right>
          <el-button-group>
            <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
            <elm-open-button url="material_edit" title="新增"  width="900" height="50%">新增</elm-open-button>
          </el-button-group>
        </right>
      </template>
      <elm-table url="/business/wms/material/GetData" :post-data="postData" :page-size="10" height="100%">
        <el-table-column prop="material_name_mc" label="物资名称" align="center" header-align="center"></el-table-column>
        <el-table-column prop="material_category_mc" label="物资类别" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="specification" label="规格/型号" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="unit" label="单位" align="center" header-align="center"width="60"></el-table-column>
        <el-table-column prop="stock_quantity" label="当前库存数量" align="right" header-align="center" width="120"></el-table-column>
        <el-table-column prop="stock_status" label="库存状态" align="center" header-align="center"></el-table-column>
        <el-table-column prop="safety_stock_quantity" label="安全库存量" align="right" header-align="center"></el-table-column>
        <el-table-column prop="max_stock_quantity" label="最大库存量" align="right" header-align="center"></el-table-column>
        <el-table-column prop="remarks" label="备注" align="center" header-align="center"></el-table-column>
        <el-table-column prop="last_update_date" label="更新时间" align="center" header-align="center" :formatter="formatDateTime" width="100"></el-table-column>
        <el-table-column fixed="right" label="操作" width="120px" align="center">
          <template v-slot="scope">
            <elm-open-button url="material_edit" title="编辑"   width="900" height="50%" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
            <elm-delete-button  type="text" size="mini" url="/business/wms/material/Delete" :data="{ id: scope.row.id }">删除</elm-delete-button>
          </template>
        </el-table-column>
      </elm-table>
    </elm-page-tb>
  </div>

</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: { name: null}
    }
  },
  created() {
  },
  methods: {
  }
}
</script>
